import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './public-path.js'

Vue.config.productionTip = false

function render() {
  new Vue({
    router,
    render:h=>h(App),
  }).$mount('#micro-app')
}

// 生命周期 - 挂载前
export async function bootstrap() {
  console.log('two bootstrap');
}
// 生命周期 - 挂载后
export async function mount() {
  console.log('two mount');
  // 渲染
  render()
}
// 生命周期 - 解除挂载
export async function unmount(){
  console.log('two unmount');
}

// 本地调试
if(!window.__POWERED_BY_QIANKUN__){
  render()
}
